import { requestTemplate } from '@/api'
import {
  Pageable,
  SystemProductAddForm,
  SystemProductPageRequest,
} from '@/types'

/**
 * 分页查询
 */
const findPage = async (
  request: SystemProductPageRequest,
  pageable: Pageable
) => requestTemplate.findPage('/system/product/findPage', request, pageable)

/**
 * 新增
 */
const add = async (form: SystemProductAddForm) =>
  requestTemplate.add('/system/product/add', form)

/**
 * 系统产品后端接口
 */
export const systemProductApi = {
  findPage,
  add,
}
